const { Schema, model } = require('mongoose');

const adminsSchema = new Schema({
    account: String,
    password: String,
    phone:String,

    //管理员权限，默认为2，普通管理员
    power:{
        type: Number,
        default: 2
    },

    //管理员状态，默认为1正常(2为禁用)
    state: {
        type: Number,
        default: 1
    },
}, { versionKey: false });

const adminsModel = model('adminsModel', adminsSchema, 'admins');

module.exports.adminsModel = adminsModel;